const { DataTypes } = require('sequelize');
const sequelize = require('./db');
const notices = sequelize.define(
  'notice',
  // 公告发布时间，公告发布内容
  {
    id: {
      type: DataTypes.INTEGER,
      primaryKey: true,
      autoIncrement: true,
      allowNull: false,
    },
    time: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    content: {
      type: DataTypes.STRING(500),
      allowNull: false,
    },
  },
  {
    paranoid: true, //软删除
  }
);

module.exports = notices;
